package com.yjd.comm.funds.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.funds.dto.QuickPayDTO;
import com.yjd.comm.funds.dto.RechOrderDTO;
import com.yjd.comm.funds.model.RechargeOrderModel;

/**
 * <b>description</b>：充值订单表业务接口<br>
 * <b>time</b>：2017-09-19 15:40:05 <br>
 * <b>author</b>：  carl
 */
public interface IRechargeOrderService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public RechargeOrderModel insert(RechargeOrderModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(RechargeOrderModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param order_id
	 * @return
	 * @throws Exception
	 */
	public int delete(long order_id) throws Exception;


	/**
	 *  充值生成订单
	 * @param rechOrderDTO
	 * @return
	 * @throws Exception
	 */
	public QuickPayDTO rech(RechOrderDTO rechOrderDTO) throws Exception;


	/**
	 * 充值 回调
	 * @param quickPayDTO
	 * @throws Exception
	 */
	public void callBack(QuickPayDTO quickPayDTO)throws Exception;


	/**
	 * 统计 充值首付金额
	 * @param startTime
	 * @param endTime
	 * @return
	 * @throws Exception
	 */
	public Double querySumPayPrice(Long startTime,Long endTime)throws Exception;

	/**
	 * 后台未用户充值
	 * @param orderModel
	 * @throws Exception
	 */
	public void adminRechargeAoumnt(RechargeOrderModel orderModel)throws Exception;
}
